Assignemnt #112 and 113th program
Code
///Name: Derrick Andreasen
///Period: 7
///Program name: 113th Program
///File name: Hund12prog.java
///Date Finished:4/19/2016
import java.util.Scanner;
public class Hund12prog
{
public static void main( String[] args ) throws Exception
{
Scanner kb = new Scanner(System.in);
System.out.print( "Which base (2-10): " );
int base = kb.nextInt();
for ( int thous=0; thous < base; thous++ )
for ( int hund=0; hund < 10; hund++ )
for ( int tens=0; tens < 10; tens++ )
for ( int ones=0; ones < 10; ones++ )
{
System.out.print( " " + thous + "" + hund + "" + tens + "" + ones + "\r" );
Thread.sleep(10);
}
System.out.println();
// still works without the outer braces
}
}
Picture of the output